﻿<Window x:Class="PlayerScanner.SettingsWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="SettingsWindow" Height="500" Width="320">
    <Window.Resources>
        <Style TargetType="Button">
            <Setter Property="Margin" Value="0,10,0,10"/>
            <Setter Property="Height" Value="30"/>
            <Setter Property="Width" Value="85"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
        </Style>
        <Style TargetType="Label">
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>
        <Style TargetType="Label" x:Key="redLabel">
            <Setter Property="Foreground" Value="Red"/>
            <Setter Property="VerticalAlignment" Value="Top"/>
        </Style>
    </Window.Resources>
    <DockPanel LastChildFill="True">
        <Grid DockPanel.Dock="Bottom">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0" Grid.ColumnSpan="2" Style="{StaticResource redLabel}">* Requires application restart.</Label>
            <Button Grid.Row="1" Grid.Column="0" Click="ResetButtonClick">Reset Defaults</Button>
            <Button Grid.Row="1" Grid.Column="1" Click="SaveButtonClick">Save</Button>
        </Grid>
        <TabControl>
            <TabItem Header="General">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="28"/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="15"/>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Label Grid.Row="0" Grid.Column="0" Style="{StaticResource redLabel}">*</Label>
                    <Label Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left">Target process name</Label>
                    <TextBox Grid.Row="0" Grid.Column="2" HorizontalAlignment="Stretch" Text="{Binding TargetProcessName, Mode=TwoWay}"/>
                </Grid>
            </TabItem>
            <TabItem Header="Floor Items">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="15"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Label Grid.Row="0" Grid.Column="0" Style="{StaticResource redLabel}">*</Label>
                    <DockPanel Grid.Row="0" Grid.Column="1" LastChildFill="True">
                        <Label DockPanel.Dock="Top">Items filter:</Label>
                        <Expander DockPanel.Dock="Top" Header="Filter Rule Legend">
                            <ScrollViewer VerticalScrollBarVisibility="Auto" Height="180">
                                <TextBlock TextWrapping="Wrap">
                                    Format (case insensitive):<LineBreak/>
                                    Filter Type;[Named Params]<LineBreak/>
                                    <LineBreak/>
                                    Common Params:<LineBreak/>
                                    (i) identifier (item name) | text<LineBreak/>
                                     <LineBreak/>
                                    Weapons (w):<LineBreak/>
                                    (t) isTekked | { true, false }<LineBreak/>
                                    (b) isBasic | { true, false }<LineBreak/>
                                    (g) grind | number<LineBreak/>
                                    (n) native | number<LineBreak/>
                                    (a) altered beast | number<LineBreak/>
                                    (m) machine | number<LineBreak/>
                                    (d) dark | number<LineBreak/>
                                    (h) hit | number<LineBreak/>
                                    (s) special | { burning, tempest, blizzard, arrest, chaos, gush, hell, geist, spirit, berserk, king, demon }<LineBreak/>
                                    <LineBreak/>
                                    S-Rank Weapon (k):<LineBreak/>
                                    (g) grind | number<LineBreak/>
                                    (n) custom name | number<LineBreak/>
                                    (s) special | { burning, tempest, blizzard, arrest, chaos, gush, hell, geist, charge, spirit, berserk, king, demon, jellen, zalure }<LineBreak/>
                                    <LineBreak/>
                                    Armors (a):<LineBreak/>
                                    (d) defense | number<LineBreak/>
                                    (e) evasion | number<LineBreak/>
                                    (s) slots | number<LineBreak/>
                                    <LineBreak/>
                                    Shields (s):<LineBreak/>
                                    (d) defense | number<LineBreak/>
                                    (e) evasion | number<LineBreak/>
                                    <LineBreak/>
                                    Units (u):<LineBreak/>
                                    no additional parameters<LineBreak/>
                                    <LineBreak/>
                                    Mags (m):<LineBreak/>
                                    no additional parameters<LineBreak/>
                                    <LineBreak/>
                                    Technique Disks (t):<LineBreak/>
                                    (l) level | number<LineBreak/>
                                    <LineBreak/>
                                    Regular Items (r):<LineBreak/>
                                    (c) count | number<LineBreak/>
                                    <LineBreak/>
                                    Meseta (e):<LineBreak/>
                                    (c) count | number<LineBreak/>
                                    *Note: param "i" is not supported for meseta.<LineBreak/>
                                    <LineBreak/>
                                    Examples:<LineBreak/>
                                    1) #all photon drops<LineBreak/>
                                    r;photon drop<LineBreak/>
                                    2) #lame d'argent with 40 or more dark and exactly 20 native<LineBreak/>
                                    w;i:lame d'argent;d:40+;n:20<LineBreak/>
                                    3) #all untekked basic weapons with 45 or more hit that have the demon special<LineBreak/>
                                    w;t:false;b:true;h:45+;s:demon<LineBreak/>
                                    4) #luminous field with 250 or more defense but 140 or less evasion<LineBreak/>
                                    a;i:luminous field;d:250+;e:140-<LineBreak/>
                                    5) #all technique disks<LineBreak/>
                                    t<LineBreak/>
                                    <LineBreak/>
                                    See help documentation for more details.
                                </TextBlock>
                            </ScrollViewer>
                        </Expander>
                        <TextBox AcceptsReturn="True" FontFamily="Courier New" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                 Text="{Binding FloorItemsFilterRules, Mode=TwoWay}"/>
                    </DockPanel>
                </Grid>
            </TabItem>
        </TabControl>
    </DockPanel>
</Window>
